//
//  SipManager.h
//  Sip
//
//  Created by Erphan on 12/21/10.
//  Copyright 2010 Smonte. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SipCallInfo.h"
#import "Constants.h"
#import "PjSip.h"
#import <AVFoundation/AVFoundation.h>

@protocol SipManagerDelegate;

@interface SipManager : NSObject<AVAudioPlayerDelegate> {	
	id <SipManagerDelegate> delegate;
	app_config_struct app_config;
@private
	PjSip *sip;
	BOOL bSipInitialized;
	int callId;
    AVAudioPlayer *m_silentPlayer;
}


- (void)connect:(NSString *)server :(NSString *)user :(NSString *)password;
- (void)disconnect;
- (BOOL)makeCall:(NSString *)number;
- (BOOL)answerCall:(int)_callId;
- (BOOL)dropCall:(int)_callId;
- (BOOL)declineCall:(int)_callId;
- (app_config_struct *) getConfiguration;
- (BOOL)playDTMF:(NSNumber *)_callId :(NSString *)dtmf;
- (BOOL)setMute:(BOOL)_enable;
- (BOOL)setHold:(BOOL)_enable :(int)_callId;
- (BOOL)setSpeakerPhoneEnabled:(BOOL)_enable;
- (void)showRegistrationStatus;
- (int)getSipStatus;
@end